<template>
  <Dialog v-model="dialogVisible" title="评价方案" width="800px">
    <el-form ref="formRef" :model="formData" label-width="100px">
      <el-form-item label="方案名称">
        <el-input v-model="formData.schemeName" placeholder="请输入方案名称" />
      </el-form-item>
      <el-form-item label="职业名称">
        <el-input v-model="formData.professionName" placeholder="请输入职业名称" />
      </el-form-item>
      <el-form-item label="技能等级">
        <el-select v-model="formData.skillLevel" placeholder="请选择技能等级">
          <el-option label="初级" value="1" />
          <el-option label="中级" value="2" />
          <el-option label="高级" value="3" />
        </el-select>
      </el-form-item>
      <el-form-item label="方案说明">
        <el-input v-model="formData.schemeDesc" type="textarea" :rows="4" placeholder="请输入方案说明" />
      </el-form-item>
    </el-form>
    <template #footer>
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="submitForm">确 定</el-button>
    </template>
  </Dialog>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const dialogVisible = ref(false)
const formRef = ref()
const formData = ref({
  schemeName: '',
  professionName: '',
  skillLevel: '',
  schemeDesc: ''
})

const open = () => {
  dialogVisible.value = true
}

const submitForm = () => {
  // TODO: 实现提交逻辑
  dialogVisible.value = false
}

defineExpose({ open })
</script> 